<?php
/**
 * Author: Administrator
 * Date: 2022/7/23 21:50
 */

namespace DesignPatterns\Behavioral\Command;


class Invoker
{
    protected CommandInterface $command;

    public function setCommand(CommandInterface $command): void
    {
        $this->command = $command;
    }

    public function run()
    {
        return $this->command->execute();
    }

}